﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.YG
{
    /// <summary>
    /// 阳光人寿附加真心128提前给付重大疾病保险条款
    /// </summary>
    class Class13
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("重大疾病"))
            {
                if (ppa.Age < 1)
                    da.Value = ppa.Amount * 0.25 *2;
                else if (ppa.Age >= 1 && ppa.Age < 2)
                    da.Value = ppa.Amount * 0.5 *2;
                else if (ppa.Age >= 2 && ppa.Age < 3)
                    da.Value = ppa.Amount * 0.75 *2;
                else
                    da.Value = ppa.Amount *2;

                ppa.IsCurrentFinish = true;

                ppa.SchemePeriodActing.BasicPolicyPeriodActing.IsCurrentFinish = true;

            }
        }
    }
}
